/**
 *  Style.css
 *  FolioReaderKit
 *
 *  Created by Heberti Almeida on 06/05/15.
 *  Copyright (c) 2015 Folio Reader. All rights reserved.
 */

/* CSS Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

/* ePUB */
html {
    -webkit-text-size-adjust: none; /* Never autoresize text */
    margin: 0 !important;
    padding: 0 0 !important;
}

body {
    margin: 0 !important;
    padding: 20px 20px !important;
    overflow: !important;
}

/* Custom padding for tablets */
/*
@media only screen and (min-device-width: 768px){
    body {
        padding: 60px 80px !important;
    }
}
*/

/* Table */
table {
    border-collapse: collapse;
    border-spacing: 0;
}
tbody, tfoot, thead {
    vertical-align: middle !important;
}
td, th, tr {
    vertical-align: inherit !important;
}

/* List */
dd, dir, menu, ol, ul { margin-left: 30px !important; }
ol { list-style-type: decimal !important; }
li { display: list-item !important; }
ol ol, ol ul, ul ol, ul ul {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* Links */
a { -webkit-touch-callout: none; } /* Disable link callback */
* { -webkit-user-select: text; }
img { -webkit-user-select: none; }
p {
    margin: 1.3em 0 1.5em 0;
    line-height: 1.40em !important;
    text-indent: 1.25em;
}
b, strong, th {font-weight: bolder !important;}

/* Forced font overrides */
code, kbd, pre, samp, tt {
    font-family: monospace, monospace !important;
    font-size: 1rem;
}
button, input, select, textarea { display: inline-block !important; }
/*h1, h2, h3, h4, h5, h6 { font-weight: 400!important; }*/
del, s, strike { text-decoration: line-through!important; }
hr {
    background-color: rgba(0,0,0,.1) !important;
    border: none !important;
    height: 1px !important;
}


/* Sub and Super */
big { font-size: 1.15rem !important; }
small, sub, sup { font-size: .65rem !important; }
sub { vertical-align: sub !important; }
sup {
    font-family: monospace !important;
    vertical-align: super !important;
}


/* iBooks like */
a { text-decoration: none; }
pre { white-space: pre-wrap; }
@page { margin: 0 0 !important; }
table, ol, il { text-align: -webkit-auto; }
h1 ,h2 ,h3 ,h4 ,h5 ,h6 {
    text-align: -webkit-auto;
    text-rendering: optimizelegibility;
}

/* allow breaking of words on headers and anchors as they tend to be larger font size or contain longer words */
a, h1, h2, h3, h4, h5, h6 {
    word-break: break-word !important;
    -webkit-hyphens: none !important;
    hyphens: none !important;
}

/* Begin Ted */
img, svg, audio, video {
    max-height: 95% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    object-fit: contain;
    page-break-inside: avoid;
}

/* End Ted */

/* Divs are also used to size images so make sure the authors get what they intended */
/* which is for the images boxed in them to be completely visible on screen */
div { max-width: 100%; }
aside[epub|type~="footnote"] { display: none !important; }
ruby > rt, ruby > rp { -webkit-user-select: none; }
* { -webkit-font-smoothing: subpixel-antialiased }


/*
 *
 * Highlight classes
 *
 */

lk {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

/* Remove tap highlight */
input, textarea, button, highlight, select, a {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Highlight styles */
html .highlight_yellow {background:rgb(255, 235, 107)}
html .highlight_green {background:#C0ED72}
html .highlight_blue {background:#ADD8FF}
html .highlight_pink {background:#FFB0CA}
html .highlight_underline {
    text-decoration: none;
    border-bottom: 2px solid #F02814;
}

html .highlight_yellow, html .highlight_green, html .highlight_blue, html .highlight_pink, span.epub-media-overlay-playing {
    border-radius: 3px;
    padding: 0 2px;
    margin: 0 -2px;
}

/* default media overlay style */
.mediaOverlayStyle0 span.epub-media-overlay-playing {
    background: #ccc
}

.mediaOverlayStyle1 .epub-media-overlay-playing {
    border-bottom: dotted 2px transparent;
    border-radius: 0;
}



/*
 *
 * Night mode
 *
 */

html {
    background-color: #FFFFFF !important;
}

body {
    background-color: transparent !important;
}

html.nightMode {
    background-color: #131313 !important;
}

.nightMode p, .nightMode div {
    color: #767676 !important;
    background-color: transparent !important;
}

.nightMode h1, .nightMode h2, .nightMode h3, .nightMode h4, .nightMode h5, .nightMode h6 {
    color: #848484 !important;
}

html.nightMode .highlight_yellow {background:rgba(255, 235, 107, 0.9)}
html.nightMode .highlight_green {background:rgba(192, 237, 114, 0.9)}
html.nightMode .highlight_blue {background:rgba(173, 216, 255, 0.9)}
html.nightMode .highlight_pink {background:rgba(255, 176, 202, 0.9)}
html.nightMode .highlight_underline {border-bottom: 2px solid rgba(240, 40, 20, 0.6)}


/*
 *
 * Font classes
 *
 */

@font-face {
    font-family: 'andada';
    src: url('file:///android_asset/fonts/andada/Andada-Regular.otf');
}

@font-face {
    font-family: 'lato';
    src: url('file:///android_asset/fonts/lato/Lato-Regular.ttf');
}

@font-face {
    font-family: 'lora';
    src: url('file:///android_asset/fonts/lora/Lora-Regular.ttf');
}

@font-face {
    font-family: 'raleway';
    src: url('file:///android_asset/fonts/raleway/Raleway-Regular.ttf');
}

.andada {
     font-family: "andada", sans-serif;
 }
.lato {
     font-family: "lato", serif;
 }
.lora {
     font-family: "lora", serif;
 }
.raleway {
     font-family: "raleway", sans-serif;
 }

html.textSizeOne { font-size: 13px !important; }
html.textSizeTwo { font-size: 15px !important; }
html.textSizeThree { font-size: 17px !important; }
html.textSizeFour { font-size: 19px !important; }
html.textSizeFive { font-size: 21px !important; }

h1 {
    font-size: 2rem;
    line-height: 1.2;
}
h2 {
    font-size: 1.5rem;
    line-height: 1.2;
}
h3 {
    font-size: 1.17rem;
    line-height: 1.2;
}
h4 {
    font-size: 1rem;
    line-height: 1.2;
}
h5 {
    font-size: 0.83rem;
    line-height: 1.2;
}
h6 {
    font-size: 0.67rem;
    line-height: 1.2;
}
body {
    word-break: break-word !important;
    -webkit-hyphens: auto !important;
    hyphens: auto !important;
}
p, span, div {
    line-height: 1.5 !important;
}
@media only screen and (min-device-width: 600px) {
    div {
        font-size: 1rem;
        line-height: 1.438em !important;
    }
    body {
        -webkit-hyphens: none !important;
        hyphens: none !important;
    }
}